This type defines a basic Stribeck-based friction model.
This model is defined as follows.
where:
Friction Force
Normal Force
Position
Velocity
Coulomb Friction Coefficient
Static Friction Coefficient
Viscous Damping Coefficient
Stribeck Velocity Coefficient
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=real64), | public | :: | coulomb_friction_coefficient | ||||
real(kind=real64), | public | :: | static_friction_coefficient | ||||
real(kind=real64), | public | :: | stribeck_velocity | ||||
real(kind=real64), | public | :: | viscous_damping |
Overload this routine to establish constraings for the model to be enforced as part of the fitting operation.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(friction_model), | intent(in) | :: | this |
The friction_model object. |
||
real(kind=real64), | intent(in), | dimension(:) | :: | t |
An N-element array containing the time points at which the data to be fit was sampled. |
|
real(kind=real64), | intent(in), | dimension(:) | :: | x |
An N-element array containing the relative motion data. |
|
real(kind=real64), | intent(in), | dimension(:) | :: | dxdt |
An N-element array containing the relative velocity data. |
|
real(kind=real64), | intent(in), | dimension(:) | :: | nrm |
An N-element array containing the normal force data. |
|
real(kind=real64), | intent(in), | dimension(:) | :: | f |
An N-element array containing the friction force data. |
|
real(kind=real64), | intent(out), | dimension(:) | :: | rst |
An M-element array where the results of the constraint equations will be written. M must be equal to the number of constraint equations for the model. |
Evaluates the friction model given the defined parameter state.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(stribeck_model), | intent(inout) | :: | this |
The stribeck_model object. |
||
real(kind=real64), | intent(in) | :: | t |
The current simulation time value. |
||
real(kind=real64), | intent(in) | :: | x |
The current value of the relative position between the contacting bodies. |
||
real(kind=real64), | intent(in) | :: | dxdt |
The current value of the relative velocity between the contacting bodies. |
||
real(kind=real64), | intent(in) | :: | nrm |
The current normal force between the contacting bodies. |
||
real(kind=real64), | intent(in), | optional, | dimension(:) | :: | svars |
An optional array containing any internal state variables the model may rely upon. |
The friction force.
Attempts to fit a friction model to the supplied data using a Levenberg-Marquardt solver.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(friction_model), | intent(inout), | target | :: | this |
The friction model. On output, the model is updated with the final, fitted parameters. |
|
real(kind=real64), | intent(in), | target, dimension(:) | :: | t |
An N-element array containing the time points at which the friction data was sampled. This array must contain monotonically increasing data. |
|
real(kind=real64), | intent(in), | target, dimension(:) | :: | x |
An N-element array containing the relative position data. |
|
real(kind=real64), | intent(in), | target, dimension(:) | :: | v |
An N-element array containing the relative velocity data. |
|
real(kind=real64), | intent(in), | target, dimension(:) | :: | f |
An N-element array containing the friction force data. |
|
real(kind=real64), | intent(in), | target, dimension(:) | :: | n |
An N-element array containing the normal force data. |
|
real(kind=real64), | intent(in), | optional, | dimension(:) | :: | weights |
An optional N-element array that can be used to weight specific data points. The default is an array of all ones such that all points are weighted equally. |
real(kind=real64), | intent(in), | optional, | dimension(:) | :: | maxp |
An M-element array (M = the number of model parameters) containing a maximum limit for each model parameter. |
real(kind=real64), | intent(in), | optional, | dimension(:) | :: | minp |
An M-element array containing the minimum limit for each model parameter. |
real(kind=real64), | intent(in), | optional | :: | alpha |
An optional input that defines the significance level at which to evaluate the confidence intervals. The default value is 0.05 such that a 95% confidence interval is calculated. |
|
class(ode_integrator), | intent(inout), | optional, | target | :: | integrator |
An optional input, used in the event the model has internal state variables, that provides integration of the state equations. The defaults is a 4th order Rosenbrock method. |
type(iteration_controls), | intent(in), | optional | :: | controls |
An optional input providing custom iteration controls. |
|
type(lm_solver_options), | intent(in), | optional | :: | settings |
An optional input providing custom settings for the solver. |
|
type(convergence_info), | intent(out), | optional | :: | info |
An optional output that can be used to gain information about the iterative solution and the nature of the convergence. |
|
type(regression_statistics), | intent(out), | optional, | dimension(:) | :: | stats |
An optional output array of M-elements that can be used to retrieve statistical information regarding the fit of each of the M model parameters. |
real(kind=real64), | intent(out), | optional, | target, dimension(:) | :: | fmod |
An optional N-element array used to provide the fitted model results. |
real(kind=real64), | intent(out), | optional, | target, dimension(:) | :: | resid |
An optional N-element array containing the fitted residuals. |
class(errors), | intent(inout), | optional, | target | :: | err |
An optional errors-based object that if provided can be used to retrieve information relating to any errors encountered during execution. If not provided, a default implementation of the errors class is used internally to provide error handling. |
Converts an array into the parameters for the friction model.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(stribeck_model), | intent(inout) | :: | this |
The stribeck_model object. |
||
real(kind=real64), | intent(in), | dimension(:) | :: | x |
The array of parameters. See parameter_count to determine the size of this array. The parameter order is as follows.
|
|
class(errors), | intent(inout), | optional, | target | :: | err |
An optional errors-based object that if provided can be used to retrieve information relating to any errors encountered during execution. If not provided, a default implementation of the errors class is used internally to provide error handling. |
Gets the number of constraint equations the model requires to be satisfied when fitting to data.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(friction_model), | intent(in) | :: | this |
The friction_model object. |
The number of constraint equations.
Gets the number of internal state variables used by the model.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(stribeck_model), | intent(in) | :: | this |
The stribeck_model object. |
The internal state variable count.
Returns a value stating if the model relies upon internal state variables.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(stribeck_model), | intent(in) | :: | this |
The stribeck_model object. |
Returns true if the model utilizes internal state variables; else, returns false.
Gets the number of model parameters.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(stribeck_model), | intent(in) | :: | this |
The stribeck_model object. |
The number of model parameters.
Resets the friction model to it's original state.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(friction_model), | intent(inout) | :: | this |
The friction_model object. |
Evaluates the time derivatives of the internal friction state model.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(stribeck_model), | intent(inout) | :: | this |
The stribeck_model object. |
||
real(kind=real64), | intent(in) | :: | t |
The current simulation time value. |
||
real(kind=real64), | intent(in) | :: | x |
The current value of the relative position between the contacting bodies. |
||
real(kind=real64), | intent(in) | :: | dxdt |
The current value of the relative velocity between the contacting bodies. |
||
real(kind=real64), | intent(in) | :: | nrm |
The current normal force between the contacting bodies. |
||
real(kind=real64), | intent(in), | dimension(:) | :: | svars |
An N-element array containing any internal state variables the model may rely upon. |
|
real(kind=real64), | intent(out), | dimension(:) | :: | dsdt |
An N-element array where the state variable derivatives are to be written. |
Converts the parameters of the friction model into an array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(stribeck_model), | intent(in) | :: | this |
The stribeck_model object. |
||
real(kind=real64), | intent(out), | dimension(:) | :: | x |
The array used to store the parameters. See parameter_count to determine the size of this array. The parameter order is as follows.
|
|
class(errors), | intent(inout), | optional, | target | :: | err |
An optional errors-based object that if provided can be used to retrieve information relating to any errors encountered during execution. If not provided, a default implementation of the errors class is used internally to provide error handling. |